import service from ".";
import qs from "qs";

const loginApi = {
    login(admin) {
        return service.post('/login', qs.stringify(admin));
    },
    top5() {
        return service.get('/admin/info/top5');
    },
    top5Pname() {
        return service.get('/admin/info/top5pname');
    },
    select() {
        return service.get('/admin/select');
    },
    insert(admin) {
        return service.post('/admin/insert', admin);
    },
    updateByOid(admin) {
        return service.put('/admin/updateByOid', admin);
    },
    updateByPid(admin) {
        return service.put('/admin/updateByPid', admin);
    },
    deleteByOid(oid) {
        return service.delete(`/admin/deleteByOid/${oid}`);
    },
    deleteByPid(pid) {
        return service.delete(`/admin/deleteByPid/${pid}`);
    },
    captcha(){
        return service.get("/captcha")
    }
};
export default loginApi;